package com.wayhome.srpingbootmybatis.async.dto;


import javax.validation.constraints.NotNull;
import java.io.Serializable;

public class AsyncTaskAddDTO implements Serializable {

    private static final long serialVersionUID = 3416479731425753683L;
    /**
     * 业务任务的唯一键
     * 任务消息将按照此key去重，所以同一个任务的taskKey 必须一样。否侧视为多个任务
     */
    @NotNull(message = "任务消息Key不能为空")
    private String taskKey;

    /**
     * 此任务的描述信息，用户页面展示
     */
    @NotNull(message = "任务说明不能为空")
    private String taskDesc;

    /**
     * 任务类型： 自己根据业务定义的任务分类
     */
    @NotNull(message = "任务类型不能为空")
    private String taskType;

    private String opterId;

    /**
     * 经办人姓名
     */
    private String opterName;


    /**
     * 是否允许发送消息
     */
    private boolean allowsendpm = true;

    public String getOpterName() {
        return opterName;
    }

    public void setOpterName(String opterName) {
        this.opterName = opterName;
    }

    /**
     * 执行异步任务时候的参数。
     */
    private Object jobParameter;

    public String getTaskKey() {
        return taskKey;
    }

    public void setTaskKey(String taskKey) {
        this.taskKey = taskKey;
    }

    public String getTaskDesc() {
        return taskDesc;
    }

    public void setTaskDesc(String taskDesc) {
        this.taskDesc = taskDesc;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public Object getJobParameter() {
        return jobParameter;
    }

    public void setJobParameter(Object jobParameter) {
        this.jobParameter = jobParameter;
    }

    public String getOpterId() {
        return opterId;
    }

    public void setOpterId(String opterId) {
        this.opterId = opterId;
    }

    public boolean isAllowsendpm() {
        return allowsendpm;
    }

    public void setAllowsendpm(boolean allowsendpm) {
        this.allowsendpm = allowsendpm;
    }
}
